package domin;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;

import java.io.Serializable;
@Setter
@Getter
@Slf4j
@AllArgsConstructor
@NoArgsConstructor
public final class Actor implements Comparable<Actor>,Serializable{
    private Integer id;
    private String name;

    public Actor(String name){
        this.name=name;
    };
    public Actor(String name, Integer id){
        this.name = name;
        this.id = id;
    }
    @Override
    public int compareTo(Actor o) {
        // TODO Auto-generated method stub
        return this.id - o.id;
    }
    public String toString()
    {
        final String TAB = "    ";

        String retValue = "";

        retValue = "Title ( "
                + super.toString() + TAB
                + "id = " + this.id + TAB
                + "name = " + this.name + TAB
                + " )";

        return retValue;
    }

}
